<%@ page import="net.comic.enums.FinderType" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title><g:layoutTitle default="Grails" /></title>
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        
        <link rel="stylesheet" href="${createLinkTo(dir:'css',file:'main.css')}" />
	    <link rel="stylesheet" href="${resource(dir:'css/autocomplete',file:'jquery.autocomplete.css')}" />
	    <link rel="stylesheet" href="${resource(dir:'css/stars',file:'ui.stars.min.css')}" />
        
      	<g:javascript library="jquery"/>
    	<g:javascript library="jquery/autocomplete/jquery.autocomplete.min"/>
    	<g:javascript library="ui/jquery-ui-1.7.2.custom.min"/>
    	<g:javascript library="stars/ui.stars.min"/>
        <g:layoutHead />
        <g:javascript library="application" />				
    </head>
    <body>
    
    	<div id="header">
    		<img src="${resource(dir:'images',file:'grails_logo.jpg')}" alt="Grails" />
    	
	    	<div id="spinner" class="spinner" style="display:none;">
	            <img src="${resource(dir:'images',file:'spinner.gif')}" alt="Spinner" />
	        </div>
	        

			<g:if test="${session.userLogged == null}">
				<span class="headerLink">
				<a id="showLogin" >test</a>
<!--		       		<g:link controller="autentication" action="showLogin">LOGIN</g:link>-->
		       		<g:link controller="user" action="create">REGISTER</g:link>
        		</span>	
        		<div id="loginDiv" class="hidden">
			        <g:render template="/autentication/login"/>
			    </div>
	        </g:if>
	        <g:else>
	        	<g:link class="headerLink" controller="autentication" action="logout">LOGOUT</g:link>
	        </g:else>
	        
	        
	        <div id="finderDiv">
	        	<g:form action='show' method='post'>
			        <input type="text" id="finderInput" name="finderInput" />
			        <g:select id="finderTypeInput" name="finderTypeInput" from="${FinderType.values()}" optionKey="key"/>
	        	</g:form>
        	</div>	        
    	</div>
    	
        <g:layoutBody />		
    </body>	
</html>